{% set title = _('Rated {0} out of 5 stars')|format_html(rating) %}
{% if detailpage %}
  <span class="stars large stars-{{ rating }}" title="{{ title }}">
      {% trans %}
        Rated {{ rating }} out of 5 stars
      {% endtrans %}
  </span>
{% else %}
  <span class="stars stars-{{ rating }}" title="{{ title }}">{{ title }}</span>
{% endif %}
